package com.sk.bilibili.adapter.pager.member;

import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;

import com.sk.bilibili.adapter.pager.BaseFragmentAdapter;
import com.sk.bilibili.view.fragment.member.FavoritesFragment;
import com.sk.bilibili.view.fragment.member.DynamicFragment;
import com.sk.bilibili.view.fragment.member.FollowThemFragment;
import com.sk.bilibili.view.fragment.member.HomeFragment;
import com.sk.bilibili.view.fragment.member.VideoSetFragment;

public class MemberFragmentAdapter extends BaseFragmentAdapter {

    private Integer memberId;

    public MemberFragmentAdapter(@NonNull FragmentManager fm,Integer memberId) {
        super(fm);
        this.memberId=memberId;
        initData();
    }

    @Override
    protected String[] getTitles() {
        return "主页,动态,投稿,收藏,追番".split(",");
    }

    @Override
    protected Fragment[] getFragments() {
        Fragment[] fragments=new Fragment[5];
        fragments[0]=new HomeFragment(memberId);
        fragments[1]=new DynamicFragment(memberId);
        fragments[2]=new VideoSetFragment(memberId);
        fragments[3]=new FavoritesFragment(memberId);
        fragments[4]=new FollowThemFragment(memberId);
        return fragments;
    }

}